home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Actual 85 Febrero 2004.iso / Experto / Apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252577_mod_ssl.html.en < prev    next >
Encoding:
Extensible Markup Language  |  2003-06-30  |  95.4 KB  |  1,505 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>mod_ssl - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body>
  14. <div id="page-header">
  15. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  16. <p class="apache">Apache HTTP Server Version 2.0</p>
  17. <img alt="" src="../images/feather.gif" /></div>
  18. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  19. <div id="path">
  20. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div>
  21. <div id="page-content">
  22. <div id="preamble"><h1>Apache Module mod_ssl</h1>
  23. <div class="toplang">
  24. <p><span>Available Languages: </span><a href="../en/mod/mod_ssl.html" title="English"> en </a></p>
  25. </div>
  26. <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Strong cryptography using the Secure Sockets
  27. Layer (SSL) and Transport Layer Security (TLS) protocols</td></tr>
  28. <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  29. <tr><th><a href="module-dict.html#ModuleIdentifier">ModuleáIdentifier:</a></th><td>ssl_module</td></tr>
  30. <tr><th><a href="module-dict.html#SourceFile">SourceáFile:</a></th><td>mod_ssl.c</td></tr></table>
  31. <h3>Summary</h3>
  32.  
  33. <p>This module provides SSL v2/v3 and TLS v1 support for the Apache
  34. HTTP Server.  It was contributed by Ralf S. Engeschall based on his
  35. mod_ssl project and originally derived from work by Ben Laurie.</p>
  36.  
  37. <p>This module relies on <a href="http://www.openssl.org/">OpenSSL</a>
  38. to provide the cryptography engine.</p>
  39.  
  40. <p>Further details, discussion, and examples are provided in the
  41. <a href="../ssl/">SSL documentation</a>.</p>
  42. </div>
  43. <div id="quickview"><h3 class="directives">Directives</h3>
  44. <ul id="toc">
  45. <li><img alt="" src="../images/down.gif" /> <a href="#sslcacertificatefile">SSLCACertificateFile</a></li>
  46. <li><img alt="" src="../images/down.gif" /> <a href="#sslcacertificatepath">SSLCACertificatePath</a></li>
  47. <li><img alt="" src="../images/down.gif" /> <a href="#sslcarevocationfile">SSLCARevocationFile</a></li>
  48. <li><img alt="" src="../images/down.gif" /> <a href="#sslcarevocationpath">SSLCARevocationPath</a></li>
  49. <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatechainfile">SSLCertificateChainFile</a></li>
  50. <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatefile">SSLCertificateFile</a></li>
  51. <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></li>
  52. <li><img alt="" src="../images/down.gif" /> <a href="#sslciphersuite">SSLCipherSuite</a></li>
  53. <li><img alt="" src="../images/down.gif" /> <a href="#sslengine">SSLEngine</a></li>
  54. <li><img alt="" src="../images/down.gif" /> <a href="#sslmutex">SSLMutex</a></li>
  55. <li><img alt="" src="../images/down.gif" /> <a href="#ssloptions">SSLOptions</a></li>
  56. <li><img alt="" src="../images/down.gif" /> <a href="#sslpassphrasedialog">SSLPassPhraseDialog</a></li>
  57. <li><img alt="" src="../images/down.gif" /> <a href="#sslprotocol">SSLProtocol</a></li>
  58. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycacertificatefile">SSLProxyCACertificateFile</a></li>
  59. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></li>
  60. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycarevocationfile">SSLProxyCARevocationFile</a></li>
  61. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycarevocationpath">SSLProxyCARevocationPath</a></li>
  62. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyciphersuite">SSLProxyCipherSuite</a></li>
  63. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyengine">SSLProxyEngine</a></li>
  64. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxymachinecertificatefile">SSLProxyMachineCertificateFile</a></li>
  65. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxymachinecertificatepath">SSLProxyMachineCertificatePath</a></li>
  66. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyprotocol">SSLProxyProtocol</a></li>
  67. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyverify">SSLProxyVerify</a></li>
  68. <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyverifydepth">SSLProxyVerifyDepth</a></li>
  69. <li><img alt="" src="../images/down.gif" /> <a href="#sslrandomseed">SSLRandomSeed</a></li>
  70. <li><img alt="" src="../images/down.gif" /> <a href="#sslrequire">SSLRequire</a></li>
  71. <li><img alt="" src="../images/down.gif" /> <a href="#sslrequiressl">SSLRequireSSL</a></li>
  72. <li><img alt="" src="../images/down.gif" /> <a href="#sslsessioncache">SSLSessionCache</a></li>
  73. <li><img alt="" src="../images/down.gif" /> <a href="#sslsessioncachetimeout">SSLSessionCacheTimeout</a></li>
  74. <li><img alt="" src="../images/down.gif" /> <a href="#sslverifyclient">SSLVerifyClient</a></li>
  75. <li><img alt="" src="../images/down.gif" /> <a href="#sslverifydepth">SSLVerifyDepth</a></li>
  76. </ul>
  77. <h3>Topics</h3>
  78. <ul id="topics">
  79. <li><img alt="" src="../images/down.gif" /> <a href="#envvars">Environment Variables</a></li>
  80. <li><img alt="" src="../images/down.gif" /> <a href="#logformats">Custom Log Formats</a></li>
  81. </ul></div>
  82. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  83. <div class="section">
  84. <h2><a name="envvars" id="envvars">Environment Variables</a></h2>
  85.  
  86. <p>This module provides a lot of SSL information as additional environment
  87. variables to the SSI and CGI namespace. The generated variables are listed in
  88. the table below. For backward compatibility the information can
  89. be made available under different names, too. Look in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details on the
  90. compatibility variables.</p>
  91.  
  92. <table class="bordered">
  93. <tr>
  94.  <th>Variable Name:</th>
  95.  <th>Value Type:</th>
  96.  <th>Description:</th>
  97. </tr>
  98. <tr><td><code>HTTPS</code></td>                         <td>flag</td>      <td>HTTPS is being used.</td></tr>
  99. <tr><td><code>SSL_PROTOCOL</code></td>                  <td>string</td>    <td>The SSL protocol version (SSLv2, SSLv3, TLSv1)</td></tr>
  100. <tr><td><code>SSL_SESSION_ID</code></td>                <td>string</td>    <td>The hex-encoded SSL session id</td></tr>
  101. <tr><td><code>SSL_CIPHER</code></td>                    <td>string</td>    <td>The cipher specification name</td></tr>
  102. <tr><td><code>SSL_CIPHER_EXPORT</code></td>             <td>string</td>    <td><code>true</code> if cipher is an export cipher</td></tr>
  103. <tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (actually used)</td></tr>
  104. <tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (possible)</td></tr>
  105. <tr><td><code>SSL_VERSION_INTERFACE</code></td>         <td>string</td>    <td>The mod_ssl program version</td></tr>
  106. <tr><td><code>SSL_VERSION_LIBRARY</code></td>           <td>string</td>    <td>The OpenSSL program version</td></tr>
  107. <tr><td><code>SSL_CLIENT_M_VERSION</code></td>          <td>string</td>    <td>The version of the client certificate</td></tr>
  108. <tr><td><code>SSL_CLIENT_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the client certificate</td></tr>
  109. <tr><td><code>SSL_CLIENT_S_DN</code></td>               <td>string</td>    <td>Subject DN in client's certificate</td></tr>
  110. <tr><td><code>SSL_CLIENT_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Subject DN</td></tr>
  111. <tr><td><code>SSL_CLIENT_I_DN</code></td>               <td>string</td>    <td>Issuer DN of client's certificate</td></tr>
  112. <tr><td><code>SSL_CLIENT_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Issuer DN</td></tr>
  113. <tr><td><code>SSL_CLIENT_V_START</code></td>            <td>string</td>    <td>Validity of client's certificate (start time)</td></tr>
  114. <tr><td><code>SSL_CLIENT_V_END</code></td>              <td>string</td>    <td>Validity of client's certificate (end time)</td></tr>
  115. <tr><td><code>SSL_CLIENT_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of client's certificate</td></tr>
  116. <tr><td><code>SSL_CLIENT_A_KEY</code></td>              <td>string</td>    <td>Algorithm used for the public key of client's certificate</td></tr>
  117. <tr><td><code>SSL_CLIENT_CERT</code></td>               <td>string</td>    <td>PEM-encoded client certificate</td></tr>
  118. <tr><td><code>SSL_CLIENT_CERT_CHAIN</code><em>n</em></td> <td>string</td>    <td>PEM-encoded certificates in client certificate chain</td></tr>
  119. <tr><td><code>SSL_CLIENT_VERIFY</code></td>             <td>string</td>    <td><code>NONE</code>, <code>SUCCESS</code>, <code>GENEROUS</code> or <code>FAILED:</code><em>reason</em></td></tr>
  120. <tr><td><code>SSL_SERVER_M_VERSION</code></td>          <td>string</td>    <td>The version of the server certificate</td></tr>
  121. <tr><td><code>SSL_SERVER_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the server certificate</td></tr>
  122. <tr><td><code>SSL_SERVER_S_DN</code></td>               <td>string</td>    <td>Subject DN in server's certificate</td></tr>
  123. <tr><td><code>SSL_SERVER_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Subject DN</td></tr>
  124. <tr><td><code>SSL_SERVER_I_DN</code></td>               <td>string</td>    <td>Issuer DN of server's certificate</td></tr>
  125. <tr><td><code>SSL_SERVER_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Issuer DN</td></tr>
  126. <tr><td><code>SSL_SERVER_V_START</code></td>            <td>string</td>    <td>Validity of server's certificate (start time)</td></tr>
  127. <tr><td><code>SSL_SERVER_V_END</code></td>              <td>string</td>    <td>Validity of server's certificate (end time)</td></tr>
  128. <tr><td><code>SSL_SERVER_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of server's certificate</td></tr>
  129. <tr><td><code>SSL_SERVER_A_KEY</code></td>              <td>string</td>    <td>Algorithm used for the public key of server's certificate</td></tr>
  130. <tr><td><code>SSL_SERVER_CERT</code></td>               <td>string</td>    <td>PEM-encoded server certificate</td></tr>
  131. <tr><td colspan="3">[ where <em>x509</em> is a component of a X.509 DN:
  132.   <code>C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email</code> ]</td></tr>
  133. </table>
  134. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  135. <div class="section">
  136. <h2><a name="logformats" id="logformats">Custom Log Formats</a></h2>
  137.  
  138. <p>When <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is built into Apache or at least
  139. loaded (under DSO situation) additional functions exist for the <a href="mod_log_config.html#formats">Custom Log Format</a> of 
  140. <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>. First there is an
  141. additional ``<code>%{</code><em>varname</em><code>}x</code>''
  142. eXtension format function which can be used to expand any variables
  143. provided by any module, especially those provided by mod_ssl which can
  144. you find in the above table.</p>
  145. <p>
  146. For backward compatibility there is additionally a special
  147. ``<code>%{</code><em>name</em><code>}c</code>'' cryptography format function
  148. provided. Information about this function is provided in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
  149. <p>
  150. Example:</p>
  151. <div class="example"><p><code>
  152. CustomLog logs/ssl_request_log \
  153.           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  154. </code></p></div>
  155. </div>
  156. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  157. <div class="directive-section"><h2><a name="SSLCACertificateFile" id="SSLCACertificateFile">SSLCACertificateFile</a> <a name="sslcacertificatefile" id="sslcacertificatefile">Directive</a></h2>
  158. <table class="directive">
  159. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates 
  160. for Client Auth</td></tr>
  161. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCACertificateFile <em>file-path</em></code></td></tr>
  162. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  163. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  164. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  165. </table>
  166. <p>
  167. This directive sets the <em>all-in-one</em> file where you can assemble the
  168. Certificates of Certification Authorities (CA) whose <em>clients</em> you deal
  169. with. These are used for Client Authentication. Such a file is simply the
  170. concatenation of the various PEM-encoded Certificate files, in order of
  171. preference. This can be used alternatively and/or additionally to 
  172. <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code>.</p>
  173. <div class="example"><h3>Example</h3><p><code>
  174. SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-client.crt
  175. </code></p></div>
  176.  
  177. </div>
  178. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  179. <div class="directive-section"><h2><a name="SSLCACertificatePath" id="SSLCACertificatePath">SSLCACertificatePath</a> <a name="sslcacertificatepath" id="sslcacertificatepath">Directive</a></h2>
  180. <table class="directive">
  181. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for 
  182. Client Auth</td></tr>
  183. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCACertificatePath <em>directory-path</em></code></td></tr>
  184. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  185. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  186. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  187. </table>
  188. <p>
  189. This directive sets the directory where you keep the Certificates of
  190. Certification Authorities (CAs) whose clients you deal with. These are used to
  191. verify the client certificate on Client Authentication.</p>
  192. <p>
  193. The files in this directory have to be PEM-encoded and are accessed through
  194. hash filenames. So usually you can't just place the Certificate files
  195. there: you also have to create symbolic links named
  196. <em>hash-value</em><code>.N</code>. And you should always make sure this directory
  197. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  198. comes with mod_ssl to accomplish this task.</p>
  199. <div class="example"><h3>Example</h3><p><code>
  200. SSLCACertificatePath /usr/local/apache/conf/ssl.crt/
  201. </code></p></div>
  202.  
  203. </div>
  204. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  205. <div class="directive-section"><h2><a name="SSLCARevocationFile" id="SSLCARevocationFile">SSLCARevocationFile</a> <a name="sslcarevocationfile" id="sslcarevocationfile">Directive</a></h2>
  206. <table class="directive">
  207. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA CRLs for 
  208. Client Auth</td></tr>
  209. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCARevocationFile <em>file-path</em></code></td></tr>
  210. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  211. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  212. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  213. </table>
  214. <p>
  215. This directive sets the <em>all-in-one</em> file where you can
  216. assemble the Certificate Revocation Lists (CRL) of Certification
  217. Authorities (CA) whose <em>clients</em> you deal with. These are used
  218. for Client Authentication.  Such a file is simply the concatenation of
  219. the various PEM-encoded CRL files, in order of preference. This can be
  220. used alternatively and/or additionally to <code class="directive"><a href="#sslcarevocationpath">SSLCARevocationPath</a></code>.</p>
  221. <div class="example"><h3>Example</h3><p><code>
  222. SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle-client.crl
  223. </code></p></div>
  224.  
  225. </div>
  226. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  227. <div class="directive-section"><h2><a name="SSLCARevocationPath" id="SSLCARevocationPath">SSLCARevocationPath</a> <a name="sslcarevocationpath" id="sslcarevocationpath">Directive</a></h2>
  228. <table class="directive">
  229. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA CRLs for 
  230. Client Auth</td></tr>
  231. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCARevocationPath <em>directory-path</em></code></td></tr>
  232. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  233. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  234. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  235. </table>
  236. <p>
  237. This directive sets the directory where you keep the Certificate Revocation
  238. Lists (CRL) of Certification Authorities (CAs) whose clients you deal with.
  239. These are used to revoke the client certificate on Client Authentication.</p>
  240. <p>
  241. The files in this directory have to be PEM-encoded and are accessed through
  242. hash filenames. So usually you have not only to place the CRL files there.
  243. Additionally you have to create symbolic links named
  244. <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
  245. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  246. comes with <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> to accomplish this task.</p>
  247. <div class="example"><h3>Example</h3><p><code>
  248. SSLCARevocationPath /usr/local/apache/conf/ssl.crl/
  249. </code></p></div>
  250.  
  251. </div>
  252. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  253. <div class="directive-section"><h2><a name="SSLCertificateChainFile" id="SSLCertificateChainFile">SSLCertificateChainFile</a> <a name="sslcertificatechainfile" id="sslcertificatechainfile">Directive</a></h2>
  254. <table class="directive">
  255. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of PEM-encoded Server CA Certificates</td></tr>
  256. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateChainFile <em>file-path</em></code></td></tr>
  257. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  258. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  259. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  260. </table>
  261. <p>
  262. This directive sets the optional <em>all-in-one</em> file where you can
  263. assemble the certificates of Certification Authorities (CA) which form the
  264. certificate chain of the server certificate. This starts with the issuing CA
  265. certificate of of the server certificate and can range up to the root CA
  266. certificate. Such a file is simply the concatenation of the various
  267. PEM-encoded CA Certificate files, usually in certificate chain order.</p>
  268. <p>
  269. This should be used alternatively and/or additionally to <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> for explicitly
  270. constructing the server certificate chain which is sent to the browser
  271. in addition to the server certificate. It is especially useful to
  272. avoid conflicts with CA certificates when using client
  273. authentication. Because although placing a CA certificate of the
  274. server certificate chain into <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> has the same effect
  275. for the certificate chain construction, it has the side-effect that
  276. client certificates issued by this same CA certificate are also
  277. accepted on client authentication. That's usually not one expect.</p>
  278. <p>
  279. But be careful: Providing the certificate chain works only if you are using a
  280. <em>single</em> (either RSA <em>or</em> DSA) based server certificate. If you are
  281. using a coupled RSA+DSA certificate pair, this will work only if actually both
  282. certificates use the <em>same</em> certificate chain. Else the browsers will be
  283. confused in this situation.</p>
  284. <div class="example"><h3>Example</h3><p><code>
  285. SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt
  286. </code></p></div>
  287.  
  288. </div>
  289. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  290. <div class="directive-section"><h2><a name="SSLCertificateFile" id="SSLCertificateFile">SSLCertificateFile</a> <a name="sslcertificatefile" id="sslcertificatefile">Directive</a></h2>
  291. <table class="directive">
  292. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Server PEM-encoded X.509 Certificate file</td></tr>
  293. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateFile <em>file-path</em></code></td></tr>
  294. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  295. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  296. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  297. </table>
  298. <p>
  299. This directive points to the PEM-encoded Certificate file for the server and
  300. optionally also to the corresponding RSA or DSA Private Key file for it
  301. (contained in the same file). If the contained Private Key is encrypted the
  302. Pass Phrase dialog is forced at startup time. This directive can be used up to
  303. two times (referencing different filenames) when both a RSA and a DSA based
  304. server certificate is used in parallel.</p>
  305. <div class="example"><h3>Example</h3><p><code>
  306. SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
  307. </code></p></div>
  308.  
  309. </div>
  310. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  311. <div class="directive-section"><h2><a name="SSLCertificateKeyFile" id="SSLCertificateKeyFile">SSLCertificateKeyFile</a> <a name="sslcertificatekeyfile" id="sslcertificatekeyfile">Directive</a></h2>
  312. <table class="directive">
  313. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Server PEM-encoded Private Key file</td></tr>
  314. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateKeyFile <em>file-path</em></code></td></tr>
  315. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  316. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  317. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  318. </table>
  319. <p>
  320. This directive points to the PEM-encoded Private Key file for the
  321. server. If the Private Key is not combined with the Certificate in the
  322. <code class="directive">SSLCertificateFile</code>, use this additional directive to
  323. point to the file with the stand-alone Private Key. When
  324. <code class="directive">SSLCertificateFile</code> is used and the file
  325. contains both the Certificate and the Private Key this directive need
  326. not be used. But we strongly discourage this practice.  Instead we
  327. recommend you to separate the Certificate and the Private Key. If the
  328. contained Private Key is encrypted, the Pass Phrase dialog is forced
  329. at startup time. This directive can be used up to two times
  330. (referencing different filenames) when both a RSA and a DSA based
  331. private key is used in parallel.</p>
  332. <div class="example"><h3>Example</h3><p><code>
  333. SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
  334. </code></p></div>
  335.  
  336. </div>
  337. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  338. <div class="directive-section"><h2><a name="SSLCipherSuite" id="SSLCipherSuite">SSLCipherSuite</a> <a name="sslciphersuite" id="sslciphersuite">Directive</a></h2>
  339. <table class="directive">
  340. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Cipher Suite available for negotiation in SSL 
  341. handshake</td></tr>
  342. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCipherSuite <em>cipher-spec</em></code></td></tr>
  343. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code></td></tr>
  344. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  345. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  346. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  347. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  348. </table>
  349. <p>
  350. This complex directive uses a colon-separated <em>cipher-spec</em> string
  351. consisting of OpenSSL cipher specifications to configure the Cipher Suite the
  352. client is permitted to negotiate in the SSL handshake phase. Notice that this
  353. directive can be used both in per-server and per-directory context. In
  354. per-server context it applies to the standard SSL handshake when a connection
  355. is established. In per-directory context it forces a SSL renegotation with the
  356. reconfigured Cipher Suite after the HTTP request was read but before the HTTP
  357. response is sent.</p>
  358. <p>
  359. An SSL cipher specification in <em>cipher-spec</em> is composed of 4 major
  360. attributes plus a few extra minor ones:</p>
  361. <ul>
  362. <li><em>Key Exchange Algorithm</em>:<br />
  363.     RSA or Diffie-Hellman variants.
  364. </li>
  365. <li><em>Authentication Algorithm</em>:<br />
  366.     RSA, Diffie-Hellman, DSS or none.
  367. </li>
  368. <li><em>Cipher/Encryption Algorithm</em>:<br />
  369.     DES, Triple-DES, RC4, RC2, IDEA or none.
  370. </li>
  371. <li><em>MAC Digest Algorithm</em>:<br />
  372.     MD5, SHA or SHA1.
  373. </li>
  374. </ul>
  375. <p>An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1
  376. cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use,
  377. one can either specify all the Ciphers, one at a time, or use aliases to
  378. specify the preference and order for the ciphers (see <a href="#table1">Table
  379. 1</a>).</p>
  380.  
  381. <table class="bordered">
  382. <tr><th>Tag</th> <th>Description</th></tr>
  383. <tr><td colspan="2"><em>Key Exchange Algorithm:</em></td></tr>
  384. <tr><td><code>kRSA</code></td>   <td>RSA key exchange</td></tr>
  385. <tr><td><code>kDHr</code></td>   <td>Diffie-Hellman key exchange with RSA key</td></tr>
  386. <tr><td><code>kDHd</code></td>   <td>Diffie-Hellman key exchange with DSA key</td></tr>
  387. <tr><td><code>kEDH</code></td>   <td>Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)</td>   </tr>
  388. <tr><td colspan="2"><em>Authentication Algorithm:</em></td></tr>
  389. <tr><td><code>aNULL</code></td>  <td>No authentication</td></tr>
  390. <tr><td><code>aRSA</code></td>   <td>RSA authentication</td></tr>
  391. <tr><td><code>aDSS</code></td>   <td>DSS authentication</td> </tr>
  392. <tr><td><code>aDH</code></td>    <td>Diffie-Hellman authentication</td></tr>
  393. <tr><td colspan="2"><em>Cipher Encoding Algorithm:</em></td></tr>
  394. <tr><td><code>eNULL</code></td>  <td>No encoding</td>         </tr>
  395. <tr><td><code>DES</code></td>    <td>DES encoding</td>        </tr>
  396. <tr><td><code>3DES</code></td>   <td>Triple-DES encoding</td> </tr>
  397. <tr><td><code>RC4</code></td>    <td>RC4 encoding</td>       </tr>
  398. <tr><td><code>RC2</code></td>    <td>RC2 encoding</td>       </tr>
  399. <tr><td><code>IDEA</code></td>   <td>IDEA encoding</td>       </tr>
  400. <tr><td colspan="2"><em>MAC Digest Algorithm</em>:</td></tr>
  401. <tr><td><code>MD5</code></td>    <td>MD5 hash function</td></tr>
  402. <tr><td><code>SHA1</code></td>   <td>SHA1 hash function</td></tr>
  403. <tr><td><code>SHA</code></td>    <td>SHA hash function</td> </tr>
  404. <tr><td colspan="2"><em>Aliases:</em></td></tr>
  405. <tr><td><code>SSLv2</code></td>  <td>all SSL version 2.0 ciphers</td></tr>
  406. <tr><td><code>SSLv3</code></td>  <td>all SSL version 3.0 ciphers</td> </tr>
  407. <tr><td><code>TLSv1</code></td>  <td>all TLS version 1.0 ciphers</td> </tr>
  408. <tr><td><code>EXP</code></td>    <td>all export ciphers</td>  </tr>
  409. <tr><td><code>EXPORT40</code></td> <td>all 40-bit export ciphers only</td>  </tr>
  410. <tr><td><code>EXPORT56</code></td> <td>all 56-bit export ciphers only</td>  </tr>
  411. <tr><td><code>LOW</code></td>    <td>all low strength ciphers (no export, single DES)</td></tr>
  412. <tr><td><code>MEDIUM</code></td> <td>all ciphers with 128 bit encryption</td> </tr>
  413. <tr><td><code>HIGH</code></td>   <td>all ciphers using Triple-DES</td>     </tr>
  414. <tr><td><code>RSA</code></td>    <td>all ciphers using RSA key exchange</td> </tr>
  415. <tr><td><code>DH</code></td>     <td>all ciphers using Diffie-Hellman key exchange</td> </tr>
  416. <tr><td><code>EDH</code></td>    <td>all ciphers using Ephemeral Diffie-Hellman key exchange</td> </tr>
  417. <tr><td><code>ADH</code></td>    <td>all ciphers using Anonymous Diffie-Hellman key exchange</td> </tr>
  418. <tr><td><code>DSS</code></td>    <td>all ciphers using DSS authentication</td> </tr>
  419. <tr><td><code>NULL</code></td>   <td>all ciphers using no encryption</td> </tr>
  420. </table>
  421. <p>
  422. Now where this becomes interesting is that these can be put together
  423. to specify the order and ciphers you wish to use. To speed this up
  424. there are also aliases (<code>SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM,
  425. HIGH</code>) for certain groups of ciphers. These tags can be joined
  426. together with prefixes to form the <em>cipher-spec</em>. Available
  427. prefixes are:</p>
  428. <ul>
  429. <li>none: add cipher to list</li>
  430. <li><code>+</code>: add ciphers to list and pull them to current location in list</li>
  431. <li><code>-</code>: remove cipher from list (can be added later again)</li>
  432. <li><code>!</code>: kill cipher from list completely (can <strong>not</strong> be added later again)</li>
  433. </ul>
  434. <p>A simpler way to look at all of this is to use the ``<code>openssl ciphers
  435. -v</code>'' command which provides a nice way to successively create the
  436. correct <em>cipher-spec</em> string. The default <em>cipher-spec</em> string
  437. is ``<code>ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code>'' which
  438. means the following: first, remove from consideration any ciphers that do not
  439. authenticate, i.e. for SSL only the Anonymous Diffie-Hellman ciphers. Next,
  440. use ciphers using RC4 and RSA. Next include the high, medium and then the low
  441. security ciphers. Finally <em>pull</em> all SSLv2 and export ciphers to the
  442. end of the list.</p>
  443. <div class="example"><pre>
  444. $ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
  445. NULL-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=SHA1
  446. NULL-MD5                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=MD5
  447. EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
  448. ...                     ...               ...     ...           ...
  449. EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
  450. EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
  451. EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
  452. </pre></div>
  453. <p>The complete list of particular RSA & DH ciphers for SSL is given in <a href="#table2">Table 2</a>.</p>
  454. <div class="example"><h3>Example</h3><p><code>
  455. SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
  456. </code></p></div>
  457. <table class="bordered">
  458. <tr><th>Cipher-Tag</th> <th>Protocol</th> <th>Key Ex.</th> <th>Auth.</th> <th>Enc.</th> <th>MAC</th> <th>Type</th> </tr>
  459. <tr><td colspan="7"><em>RSA Ciphers:</em></td></tr>
  460. <tr><td><code>DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td /> </tr>
  461. <tr><td><code>DES-CBC3-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>MD5</td> <td /> </tr>
  462. <tr><td><code>IDEA-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>SHA1</td> <td /> </tr>
  463. <tr><td><code>RC4-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>SHA1</td> <td /> </tr>
  464. <tr><td><code>RC4-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td /> </tr>
  465. <tr><td><code>IDEA-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>MD5</td> <td /> </tr>
  466. <tr><td><code>RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC2(128)</td> <td>MD5</td> <td /> </tr>
  467. <tr><td><code>RC4-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td /> </tr>
  468. <tr><td><code>DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td /> </tr>
  469. <tr><td><code>RC4-64-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(64)</td> <td>MD5</td> <td /> </tr>
  470. <tr><td><code>DES-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>MD5</td> <td /> </tr>
  471. <tr><td><code>EXP-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  472. <tr><td><code>EXP-RC2-CBC-MD5</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>RC2(40)</td> <td>MD5</td> <td>  export</td> </tr>
  473. <tr><td><code>EXP-RC4-MD5</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
  474. <tr><td><code>EXP-RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA(512)</td> <td>RSA</td> <td>RC2(40)</td> <td>MD5</td> <td>  export</td> </tr>
  475. <tr><td><code>EXP-RC4-MD5</code></td> <td>SSLv2</td> <td>RSA(512)</td> <td>RSA</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
  476. <tr><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td /> </tr>
  477. <tr><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td /> </tr>
  478. <tr><td colspan="7"><em>Diffie-Hellman Ciphers:</em></td></tr>
  479. <tr><td><code>ADH-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>3DES(168)</td> <td>SHA1</td> <td /> </tr>
  480. <tr><td><code>ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>DES(56)</td> <td>SHA1</td> <td /> </tr>
  481. <tr><td><code>ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>RC4(128)</td> <td>MD5</td> <td /> </tr>
  482. <tr><td><code>EDH-RSA-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td /> </tr>
  483. <tr><td><code>EDH-DSS-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>3DES(168)</td> <td>SHA1</td> <td /> </tr>
  484. <tr><td><code>EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td /> </tr>
  485. <tr><td><code>EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>DES(56)</td> <td>SHA1</td> <td /> </tr>
  486. <tr><td><code>EXP-EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>RSA</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  487. <tr><td><code>EXP-EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>DSS</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  488. <tr><td><code>EXP-ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>None</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
  489. <tr><td><code>EXP-ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>None</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
  490. </table>
  491.  
  492. </div>
  493. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  494. <div class="directive-section"><h2><a name="SSLEngine" id="SSLEngine">SSLEngine</a> <a name="sslengine" id="sslengine">Directive</a></h2>
  495. <table class="directive">
  496. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SSL Engine Operation Switch</td></tr>
  497. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLEngine on|off</code></td></tr>
  498. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLEngine off</code></td></tr>
  499. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  500. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  501. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  502. </table>
  503. <p>
  504. This directive toggles the usage of the SSL/TLS Protocol Engine. This
  505. is usually used inside a <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> section to enable SSL/TLS for a
  506. particular virtual host. By default the SSL/TLS Protocol Engine is
  507. disabled for both the main server and all configured virtual hosts.</p>
  508. <div class="example"><h3>Example</h3><p><code>
  509. <VirtualHost _default_:443><br />
  510. SSLEngine on<br />
  511. ...<br />
  512. </VirtualHost>
  513. </code></p></div>
  514.  
  515. </div>
  516. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  517. <div class="directive-section"><h2><a name="SSLMutex" id="SSLMutex">SSLMutex</a> <a name="sslmutex" id="sslmutex">Directive</a></h2>
  518. <table class="directive">
  519. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Semaphore for internal mutual exclusion of 
  520. operations</td></tr>
  521. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLMutex <em>type</em></code></td></tr>
  522. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLMutex none</code></td></tr>
  523. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  524. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  525. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  526. </table>
  527. <p>
  528. This configures the SSL engine's semaphore (aka. lock) which is used for mutual
  529. exclusion of operations which have to be done in a synchronized way between the
  530. pre-forked Apache server processes. This directive can only be used in the
  531. global server context because it's only useful to have one global mutex.
  532. This directive is designed to closely match the
  533. <a href="http://httpd.apache.org/docs-2.0/mod/mpm_common.html#acceptmutex">AcceptMutex</a> directive</p>
  534. <p>
  535. The following Mutex <em>types</em> are available:</p>
  536. <ul>
  537. <li><code>none | no</code>
  538.     <p>
  539.     This is the default where no Mutex is used at all. Use it at your own
  540.     risk. But because currently the Mutex is mainly used for synchronizing
  541.     write access to the SSL Session Cache you can live without it as long
  542.     as you accept a sometimes garbled Session Cache. So it's not recommended
  543.     to leave this the default. Instead configure a real Mutex.</p></li>
  544. <li><code>posixsem</code>
  545.     <p>
  546.     This is an elegant Mutex variant where a Posix Semaphore is used when possible.
  547.     It is only available when the underlying platform
  548.     and APR supports it.</p></li>
  549. <li><code>sysvsem</code>
  550.     <p>
  551.     This is a somewhat elegant Mutex variant where a SystemV IPC Semaphore is used when
  552.     possible. It is possible to "leak" SysV semaphores if processes crash before
  553.     the semaphore is removed. It is only available when the underlying platform
  554.     and APR supports it.</p></li>
  555. <li><code>sem</code>
  556.     <p>
  557.     This directive tells the SSL Module to pick the "best" semaphore implementation
  558.     available to it, choosing between Posix and SystemV IPC, in that order. It is only
  559.     available when the underlying platform and APR supports at least one of the 2.</p></li>
  560. <li><code>pthread</code>
  561.     <p>
  562.     This directive tells the SSL Module to use Posix thread mutexes. It is only available
  563.     if the underlying platform and APR supports it.</p></li>
  564. <li><code>fcntl:/path/to/mutex</code>
  565.     <p>
  566.     This is a portable Mutex variant where a physical (lock-)file and the <code>fcntl()</code>
  567.     fucntion are used as the Mutex.
  568.     Always use a local disk filesystem for <code>/path/to/mutex</code> and never a file
  569.     residing on a NFS- or AFS-filesystem. It is only available when the underlying platform
  570.     and APR supports it. Note: Internally, the Process ID (PID) of the
  571.     Apache parent process is automatically appended to
  572.     <code>/path/to/mutex</code> to make it unique, so you don't have to worry
  573.     about conflicts yourself. Notice that this type of mutex is not available
  574.     under the Win32 environment. There you <em>have</em> to use the semaphore
  575.     mutex.</p></li>
  576. <li><code>flock:/path/to/mutex</code>
  577.     <p>
  578.     This is similar to the <code>fcntl:/path/to/mutex</code> method with the
  579.     exception that the <code>flock()</code> function is used to provide file
  580.     locking. It is only available when the underlying platform
  581.     and APR supports it.</p></li>
  582. <li><code>file:/path/to/mutex</code>
  583.     <p>
  584.     This directive tells the SSL Module to pick the "best" file locking implementation
  585.     available to it, choosing between <code>fcntl</code> and <code>flock</code>,
  586.     in that order. It is only available when the underlying platform and APR supports
  587.     at least one of the 2.</p></li>
  588. <li><code>default | yes</code>
  589.     <p>
  590.     This directive tells the SSL Module to pick the default locking implementation
  591.     as determined by the platform and APR.</p></li>
  592. </ul>
  593. <div class="example"><h3>Example</h3><p><code>
  594. SSLMutex file:/usr/local/apache/logs/ssl_mutex
  595. </code></p></div>
  596.  
  597. </div>
  598. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  599. <div class="directive-section"><h2><a name="SSLOptions" id="SSLOptions">SSLOptions</a> <a name="ssloptions" id="ssloptions">Directive</a></h2>
  600. <table class="directive">
  601. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure various SSL engine run-time options</td></tr>
  602. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLOptions [+|-]<em>option</em> ...</code></td></tr>
  603. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  604. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
  605. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  606. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  607. </table>
  608. <p>
  609. This directive can be used to control various run-time options on a
  610. per-directory basis. Normally, if multiple <code>SSLOptions</code>
  611. could apply to a directory, then the most specific one is taken
  612. completely; the options are not merged. However if <em>all</em> the
  613. options on the <code>SSLOptions</code> directive are preceded by a
  614. plus (<code>+</code>) or minus (<code>-</code>) symbol, the options
  615. are merged. Any options preceded by a <code>+</code> are added to the
  616. options currently in force, and any options preceded by a
  617. <code>-</code> are removed from the options currently in force.</p>
  618. <p>
  619. The available <em>option</em>s are:</p>
  620. <ul>
  621. <li><code>StdEnvVars</code>
  622.     <p>
  623.     When this option is enabled, the standard set of SSL related CGI/SSI
  624.     environment variables are created. This per default is disabled for
  625.     performance reasons, because the information extraction step is a
  626.     rather expensive operation. So one usually enables this option for
  627.     CGI and SSI requests only.</p>
  628. </li>
  629. <li><code>CompatEnvVars</code>
  630.     <p>
  631.     When this option is enabled, additional CGI/SSI environment variables are
  632.     created for backward compatibility to other Apache SSL solutions. Look in
  633.     the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details
  634.     on the particular variables generated.</p>
  635. </li>
  636. <li><code>ExportCertData</code>
  637.     <p>
  638.     When this option is enabled, additional CGI/SSI environment variables are
  639.     created: <code>SSL_SERVER_CERT</code>, <code>SSL_CLIENT_CERT</code> and
  640.     <code>SSL_CLIENT_CERT_CHAIN</code><em>n</em> (with <em>n</em> = 0,1,2,..).
  641.     These contain the PEM-encoded X.509 Certificates of server and client for
  642.     the current HTTPS connection and can be used by CGI scripts for deeper
  643.     Certificate checking. Additionally all other certificates of the client
  644.     certificate chain are provided, too. This bloats up the environment a
  645.     little bit which is why you have to use this option to enable it on
  646.     demand.</p>
  647. </li>
  648. <li><code>FakeBasicAuth</code>
  649.     <p>
  650.     When this option is enabled, the Subject Distinguished Name (DN) of the
  651.     Client X509 Certificate is translated into a HTTP Basic Authorization
  652.     username. This means that the standard Apache authentication methods can
  653.     be used for access control. The user name is just the Subject of the
  654.     Client's X509 Certificate (can be determined by running OpenSSL's
  655.     <code>openssl x509</code> command: <code>openssl x509 -noout -subject -in
  656.     </code><em>certificate</em><code>.crt</code>). Note that no password is
  657.     obtained from the user. Every entry in the user file needs this password:
  658.     ``<code>xxj31ZMTZzkVA</code>'', which is the DES-encrypted version of the
  659.     word `<code>password</code>''. Those who live under MD5-based encryption
  660.     (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5
  661.     hash of the same word: ``<code>$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/</code>''.</p>
  662. </li>
  663. <li><code>StrictRequire</code>
  664.     <p>
  665.     This <em>forces</em> forbidden access when <code>SSLRequireSSL</code> or
  666.     <code>SSLRequire</code> successfully decided that access should be
  667.     forbidden. Usually the default is that in the case where a ``<code>Satisfy
  668.     any</code>'' directive is used, and other access restrictions are passed,
  669.     denial of access due to <code>SSLRequireSSL</code> or
  670.     <code>SSLRequire</code> is overridden (because that's how the Apache
  671.     <code>Satisfy</code> mechanism should work.) But for strict access restriction
  672.     you can use <code>SSLRequireSSL</code> and/or <code>SSLRequire</code> in
  673.     combination with an ``<code>SSLOptions +StrictRequire</code>''. Then an
  674.     additional ``<code>Satisfy Any</code>'' has no chance once mod_ssl has
  675.     decided to deny access.</p>
  676. </li>
  677. <li><code>OptRenegotiate</code>
  678.     <p>
  679.     This enables optimized SSL connection renegotiation handling when SSL
  680.     directives are used in per-directory context. By default a strict
  681.     scheme is enabled where <em>every</em> per-directory reconfiguration of
  682.     SSL parameters causes a <em>full</em> SSL renegotiation handshake. When this
  683.     option is used mod_ssl tries to avoid unnecessary handshakes by doing more
  684.     granular (but still safe) parameter checks. Nevertheless these granular
  685.     checks sometimes maybe not what the user expects, so enable this on a
  686.     per-directory basis only, please.</p>
  687. </li>
  688. </ul>
  689. <div class="example"><h3>Example</h3><p><code>
  690. SSLOptions +FakeBasicAuth -StrictRequire<br />
  691. <Files ~ "\.(cgi|shtml)$"><br />
  692.     SSLOptions +StdEnvVars +CompatEnvVars -ExportCertData<br />
  693. <Files>
  694. </code></p></div>
  695.  
  696. </div>
  697. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  698. <div class="directive-section"><h2><a name="SSLPassPhraseDialog" id="SSLPassPhraseDialog">SSLPassPhraseDialog</a> <a name="sslpassphrasedialog" id="sslpassphrasedialog">Directive</a></h2>
  699. <table class="directive">
  700. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of pass phrase dialog for encrypted private 
  701. keys</td></tr>
  702. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLPassPhraseDialog <em>type</em></code></td></tr>
  703. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLPassPhraseDialog builtin</code></td></tr>
  704. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  705. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  706. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  707. </table>
  708. <p>
  709. When Apache starts up it has to read the various Certificate (see
  710. <code class="directive"><a href="#sslcertificatefile">SSLCertificateFile</a></code>) and
  711. Private Key (see <code class="directive"><a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></code>) files of the
  712. SSL-enabled virtual servers. Because for security reasons the Private
  713. Key files are usually encrypted, mod_ssl needs to query the
  714. administrator for a Pass Phrase in order to decrypt those files. This
  715. query can be done in two ways which can be configured by
  716. <em>type</em>:</p>
  717. <ul>
  718. <li><code>builtin</code>
  719.     <p>
  720.     This is the default where an interactive terminal dialog occurs at startup
  721.     time just before Apache detaches from the terminal. Here the administrator
  722.     has to manually enter the Pass Phrase for each encrypted Private Key file.
  723.     Because a lot of SSL-enabled virtual hosts can be configured, the
  724.     following reuse-scheme is used to minimize the dialog: When a Private Key
  725.     file is encrypted, all known Pass Phrases (at the beginning there are
  726.     none, of course) are tried. If one of those known Pass Phrases succeeds no
  727.     dialog pops up for this particular Private Key file. If none succeeded,
  728.     another Pass Phrase is queried on the terminal and remembered for the next
  729.     round (where it perhaps can be reused).</p>
  730.     <p>
  731.     This scheme allows mod_ssl to be maximally flexible (because for N encrypted
  732.     Private Key files you <em>can</em> use N different Pass Phrases - but then
  733.     you have to enter all of them, of course) while minimizing the terminal
  734.     dialog (i.e. when you use a single Pass Phrase for all N Private Key files
  735.     this Pass Phrase is queried only once).</p></li>
  736.  
  737. <li><code>exec:/path/to/program</code>
  738.     <p>
  739.     Here an external program is configured which is called at startup for each
  740.     encrypted Private Key file. It is called with two arguments (the first is
  741.     of the form ``<code>servername:portnumber</code>'', the second is either
  742.     ``<code>RSA</code>'' or ``<code>DSA</code>''), which indicate for which
  743.     server and algorithm it has to print the corresponding Pass Phrase to
  744.     <code>stdout</code>. The intent is that this external program first runs
  745.     security checks to make sure that the system is not compromised by an
  746.     attacker, and only when these checks were passed successfully it provides
  747.     the Pass Phrase.</p>
  748.     <p>
  749.     Both these security checks, and the way the Pass Phrase is determined, can
  750.     be as complex as you like. Mod_ssl just defines the interface: an
  751.     executable program which provides the Pass Phrase on <code>stdout</code>.
  752.     Nothing more or less! So, if you're really paranoid about security, here
  753.     is your interface. Anything else has to be left as an exercise to the
  754.     administrator, because local security requirements are so different.</p>
  755.     <p>
  756.     The reuse-algorithm above is used here, too. In other words: The external
  757.     program is called only once per unique Pass Phrase.</p></li>
  758. </ul>
  759. <p>
  760. Example:</p>
  761. <div class="example"><p><code>
  762. SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
  763. </code></p></div>
  764.  
  765. </div>
  766. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  767. <div class="directive-section"><h2><a name="SSLProtocol" id="SSLProtocol">SSLProtocol</a> <a name="sslprotocol" id="sslprotocol">Directive</a></h2>
  768. <table class="directive">
  769. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure usable SSL protocol flavors</td></tr>
  770. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProtocol [+|-]<em>protocol</em> ...</code></td></tr>
  771. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProtocol all</code></td></tr>
  772. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  773. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
  774. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  775. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  776. </table>
  777. <p>
  778. This directive can be used to control the SSL protocol flavors mod_ssl should
  779. use when establishing its server environment. Clients then can only connect
  780. with one of the provided protocols.</p>
  781. <p>
  782. The available (case-insensitive) <em>protocol</em>s are:</p>
  783. <ul>
  784. <li><code>SSLv2</code>
  785.     <p>
  786.     This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the
  787.     original SSL protocol as designed by Netscape Corporation.</p></li>
  788.  
  789. <li><code>SSLv3</code>
  790.     <p>
  791.     This is the Secure Sockets Layer (SSL) protocol, version 3.0. It is the
  792.     successor to SSLv2 and the currently (as of February 1999) de-facto
  793.     standardized SSL protocol from Netscape Corporation. It's supported by
  794.     almost all popular browsers.</p></li>
  795.  
  796. <li><code>TLSv1</code>
  797.     <p>
  798.     This is the Transport Layer Security (TLS) protocol, version 1.0. It is the
  799.     successor to SSLv3 and currently (as of February 1999) still under
  800.     construction by the Internet Engineering Task Force (IETF). It's still
  801.     not supported by any popular browsers.</p></li>
  802.  
  803. <li><code>All</code>
  804.     <p>
  805.     This is a shortcut for ``<code>+SSLv2 +SSLv3 +TLSv1</code>'' and a
  806.     convinient way for enabling all protocols except one when used in
  807.     combination with the minus sign on a protocol as the example above 
  808.     shows.</p></li>
  809. </ul>
  810. <div class="example"><h3>Example</h3><p><code>
  811. #   enable SSLv3 and TLSv1, but not SSLv2<br />
  812. SSLProtocol all -SSLv2
  813. </code></p></div>
  814.  
  815. </div>
  816. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  817. <div class="directive-section"><h2><a name="SSLProxyCACertificateFile" id="SSLProxyCACertificateFile">SSLProxyCACertificateFile</a> <a name="sslproxycacertificatefile" id="sslproxycacertificatefile">Directive</a></h2>
  818. <table class="directive">
  819. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates 
  820. for Remote Server Auth</td></tr>
  821. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCACertificateFile <em>file-path</em></code></td></tr>
  822. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  823. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  824. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  825. </table>
  826. <p>
  827. This directive sets the <em>all-in-one</em> file where you can assemble the
  828. Certificates of Certification Authorities (CA) whose <em>remote servers</em> you deal
  829. with. These are used for Remote Server Authentication. Such a file is simply the
  830. concatenation of the various PEM-encoded Certificate files, in order of
  831. preference. This can be used alternatively and/or additionally to 
  832. <code class="directive"><a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></code>.</p>
  833. <div class="example"><h3>Example</h3><p><code>
  834. SSLProxyCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-remote-server.crt
  835. </code></p></div>
  836.  
  837. </div>
  838. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  839. <div class="directive-section"><h2><a name="SSLProxyCACertificatePath" id="SSLProxyCACertificatePath">SSLProxyCACertificatePath</a> <a name="sslproxycacertificatepath" id="sslproxycacertificatepath">Directive</a></h2>
  840. <table class="directive">
  841. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for 
  842. Remote Server Auth</td></tr>
  843. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCACertificatePath <em>directory-path</em></code></td></tr>
  844. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  845. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  846. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  847. </table>
  848. <p>
  849. This directive sets the directory where you keep the Certificates of
  850. Certification Authorities (CAs) whose remote servers you deal with. These are used to
  851. verify the remote server certificate on Remote Server Authentication.</p>
  852. <p>
  853. The files in this directory have to be PEM-encoded and are accessed through
  854. hash filenames. So usually you can't just place the Certificate files
  855. there: you also have to create symbolic links named
  856. <em>hash-value</em><code>.N</code>. And you should always make sure this directory
  857. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  858. comes with mod_ssl to accomplish this task.</p>
  859. <div class="example"><h3>Example</h3><p><code>
  860. SSLProxyCACertificatePath /usr/local/apache/conf/ssl.crt/
  861. </code></p></div>
  862.  
  863. </div>
  864. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  865. <div class="directive-section"><h2><a name="SSLProxyCARevocationFile" id="SSLProxyCARevocationFile">SSLProxyCARevocationFile</a> <a name="sslproxycarevocationfile" id="sslproxycarevocationfile">Directive</a></h2>
  866. <table class="directive">
  867. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA CRLs for 
  868. Remote Server Auth</td></tr>
  869. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCARevocationFile <em>file-path</em></code></td></tr>
  870. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  871. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  872. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  873. </table>
  874. <p>
  875. This directive sets the <em>all-in-one</em> file where you can
  876. assemble the Certificate Revocation Lists (CRL) of Certification
  877. Authorities (CA) whose <em>remote servers</em> you deal with. These are used
  878. for Remote Server Authentication.  Such a file is simply the concatenation of
  879. the various PEM-encoded CRL files, in order of preference. This can be
  880. used alternatively and/or additionally to <code class="directive"><a href="#sslproxycarevocationpath">SSLProxyCARevocationPath</a></code>.</p>
  881. <div class="example"><h3>Example</h3><p><code>
  882. SSLProxyCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle-remote-server.crl
  883. </code></p></div>
  884.  
  885. </div>
  886. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  887. <div class="directive-section"><h2><a name="SSLProxyCARevocationPath" id="SSLProxyCARevocationPath">SSLProxyCARevocationPath</a> <a name="sslproxycarevocationpath" id="sslproxycarevocationpath">Directive</a></h2>
  888. <table class="directive">
  889. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA CRLs for 
  890. Remote Server Auth</td></tr>
  891. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCARevocationPath <em>directory-path</em></code></td></tr>
  892. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  893. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  894. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  895. </table>
  896. <p>
  897. This directive sets the directory where you keep the Certificate Revocation
  898. Lists (CRL) of Certification Authorities (CAs) whose remote servers you deal with.
  899. These are used to revoke the remote server certificate on Remote Server Authentication.</p>
  900. <p>
  901. The files in this directory have to be PEM-encoded and are accessed through
  902. hash filenames. So usually you have not only to place the CRL files there.
  903. Additionally you have to create symbolic links named
  904. <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
  905. contains the appropriate symbolic links. Use the <code>Makefile</code> which
  906. comes with <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> to accomplish this task.</p>
  907. <div class="example"><h3>Example</h3><p><code>
  908. SSLProxyCARevocationPath /usr/local/apache/conf/ssl.crl/
  909. </code></p></div>
  910.  
  911. </div>
  912. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  913. <div class="directive-section"><h2><a name="SSLProxyCipherSuite" id="SSLProxyCipherSuite">SSLProxyCipherSuite</a> <a name="sslproxyciphersuite" id="sslproxyciphersuite">Directive</a></h2>
  914. <table class="directive">
  915. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Cipher Suite available for negotiation in SSL 
  916. proxy handshake</td></tr>
  917. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCipherSuite <em>cipher-spec</em></code></td></tr>
  918. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code></td></tr>
  919. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  920. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  921. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  922. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  923. </table>
  924. <p>Equivalent to <code>SSLCipherSuite</code>, but for the proxy connection.
  925. Please refer to <code class="directive"><a href="#sslciphersuite">SSLCipherSuite</a></code>
  926. for additional information.</p>
  927.  
  928. </div>
  929. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  930. <div class="directive-section"><h2><a name="SSLProxyEngine" id="SSLProxyEngine">SSLProxyEngine</a> <a name="sslproxyengine" id="sslproxyengine">Directive</a></h2>
  931. <table class="directive">
  932. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SSL Proxy Engine Operation Switch</td></tr>
  933. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyEngine on|off</code></td></tr>
  934. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyEngine off</code></td></tr>
  935. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  936. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  937. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  938. </table>
  939. <p>
  940. This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This
  941. is usually used inside a <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> section to enable SSL/TLS for proxy
  942. usage in a particular virtual host. By default the SSL/TLS Protocol Engine is
  943. disabled for proxy image both for the main server and all configured virtual hosts.</p>
  944. <div class="example"><h3>Example</h3><p><code>
  945. <VirtualHost _default_:443><br />
  946. SSLProxyEngine on<br />
  947. ...<br />
  948. </VirtualHost>
  949. </code></p></div>
  950.  
  951. </div>
  952. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  953. <div class="directive-section"><h2><a name="SSLProxyMachineCertificateFile" id="SSLProxyMachineCertificateFile">SSLProxyMachineCertificateFile</a> <a name="sslproxymachinecertificatefile" id="sslproxymachinecertificatefile">Directive</a></h2>
  954. <table class="directive">
  955. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA certificates for proxy server client certificates</td></tr>
  956. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyMachineCertificateFile <em>filename</em></code></td></tr>
  957. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  958. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Not applicable</td></tr>
  959. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  960. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  961. </table>
  962. <p>
  963. This directive sets the all-in-one file where you keep the certificates of
  964. Certification Authorities (CAs) whose proxy client certificates are used for
  965. authentication of the proxy server to remote servers.
  966. </p>
  967. <p>
  968. This referenced file is simply the concatenation of the various PEM-encoded
  969. certificate files, in order of preference. Use this directive alternatively
  970. or additionally to <code>SSLProxyMachineCertificatePath</code>.
  971. </p>
  972. <p>
  973. Example:</p>
  974. <div class="example"><p><code>
  975. SSLProxyMachineCertificatePath /usr/local/apache/conf/ssl.crt/
  976. </code></p></div> 
  977.  
  978. </div>
  979. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  980. <div class="directive-section"><h2><a name="SSLProxyMachineCertificatePath" id="SSLProxyMachineCertificatePath">SSLProxyMachineCertificatePath</a> <a name="sslproxymachinecertificatepath" id="sslproxymachinecertificatepath">Directive</a></h2>
  981. <table class="directive">
  982. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA certificates for proxy server client certificates</td></tr>
  983. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyMachineCertificatePath <em>directory</em></code></td></tr>
  984. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  985. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Not applicable</td></tr>
  986. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  987. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  988. </table>
  989. <p>
  990. This directive sets the directory where you keep the certificates of
  991. Certification Authorities (CAs) whose proxy client certificates are used for
  992. authentication of the proxy server to remote servers.
  993. </p>
  994. <p>The files in this directory must be PEM-encoded and are accessed through
  995. hash filenames. Additionally, you must create symbolic links named
  996. <code><em>hash-value</em>.N</code>. And you should always make sure this
  997. directory contains the appropriate symbolic links. Use the Makefile which
  998. comes with mod_ssl to accomplish this task.
  999. </p>
  1000. <p>
  1001. Example:</p>
  1002. <div class="example"><p><code>
  1003. SSLProxyMachineCertificatePath /usr/local/apache/conf/ssl.crt/
  1004. </code></p></div> 
  1005.  
  1006. </div>
  1007. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1008. <div class="directive-section"><h2><a name="SSLProxyProtocol" id="SSLProxyProtocol">SSLProxyProtocol</a> <a name="sslproxyprotocol" id="sslproxyprotocol">Directive</a></h2>
  1009. <table class="directive">
  1010. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure usable SSL protocol flavors for proxy usage</td></tr>
  1011. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyProtocol [+|-]<em>protocol</em> ...</code></td></tr>
  1012. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyProtocol all</code></td></tr>
  1013. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1014. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
  1015. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1016. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1017. </table>
  1018.  
  1019. <p>
  1020. This directive can be used to control the SSL protocol flavors mod_ssl should
  1021. use when establishing its server environment for proxy . It will only connect
  1022. to servers using one of the provided protocols.</p>
  1023. <p>Please refer to <code class="directive"><a href="#sslprotocol">SSLProtocol</a></code>
  1024. for additional information.
  1025. </p>
  1026.  
  1027. </div>
  1028. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1029. <div class="directive-section"><h2><a name="SSLProxyVerify" id="SSLProxyVerify">SSLProxyVerify</a> <a name="sslproxyverify" id="sslproxyverify">Directive</a></h2>
  1030. <table class="directive">
  1031. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of remote server Certificate verification</td></tr>
  1032. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyVerify <em>level</em></code></td></tr>
  1033. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyVerify none</code></td></tr>
  1034. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1035. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  1036. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1037. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1038. </table>
  1039. <p>
  1040. This directive sets the Certificate verification level for the remote server
  1041. Authentication. Notice that this directive can be used both in per-server and
  1042. per-directory context. In per-server context it applies to the remote server
  1043. authentication process used in the standard SSL handshake when a connection is
  1044. established. In per-directory context it forces a SSL renegotation with the
  1045. reconfigured remote server verification level after the HTTP request was read but
  1046. before the HTTP response is sent.</p>
  1047. <p>
  1048. The following levels are available for <em>level</em>:</p>
  1049. <ul>
  1050. <li><strong>none</strong>:
  1051.      no remote server Certificate is required at all</li>
  1052. <li><strong>optional</strong>:
  1053.      the remote server <em>may</em> present a valid Certificate</li>
  1054. <li><strong>require</strong>:
  1055.      the remote server <em>has to</em> present a valid Certificate</li>
  1056. <li><strong>optional_no_ca</strong>:
  1057.      the remote server may present a valid Certificate<br />
  1058.      but it need not to be (successfully) verifiable.</li>
  1059. </ul>
  1060. <p>In practice only levels <strong>none</strong> and
  1061. <strong>require</strong> are really interesting, because level
  1062. <strong>optional</strong> doesn't work with all servers and level
  1063. <strong>optional_no_ca</strong> is actually against the idea of
  1064. authentication (but can be used to establish SSL test pages, etc.)</p>
  1065. <div class="example"><h3>Example</h3><p><code>
  1066. SSLProxyVerify require
  1067. </code></p></div>
  1068.  
  1069. </div>
  1070. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1071. <div class="directive-section"><h2><a name="SSLProxyVerifyDepth" id="SSLProxyVerifyDepth">SSLProxyVerifyDepth</a> <a name="sslproxyverifydepth" id="sslproxyverifydepth">Directive</a></h2>
  1072. <table class="directive">
  1073. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum depth of CA Certificates in Remote Server
  1074. Certificate verification</td></tr>
  1075. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyVerifyDepth <em>number</em></code></td></tr>
  1076. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyVerifyDepth 1</code></td></tr>
  1077. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1078. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  1079. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1080. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1081. </table>
  1082. <p>
  1083. This directive sets how deeply mod_ssl should verify before deciding that the
  1084. remote server does not have a valid certificate. Notice that this directive can be
  1085. used both in per-server and per-directory context. In per-server context it
  1086. applies to the client authentication process used in the standard SSL
  1087. handshake when a connection is established. In per-directory context it forces
  1088. a SSL renegotation with the reconfigured remote server verification depth after the
  1089. HTTP request was read but before the HTTP response is sent.</p>
  1090. <p>
  1091. The depth actually is the maximum number of intermediate certificate issuers,
  1092. i.e. the number of CA certificates which are max allowed to be followed while
  1093. verifying the remote server certificate. A depth of 0 means that self-signed
  1094. remote server certificates are accepted only, the default depth of 1 means
  1095. the remote server certificate can be self-signed or has to be signed by a CA
  1096. which is directly known to the server (i.e. the CA's certificate is under
  1097. <code class="directive"><a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></code>), etc.</p>
  1098. <div class="example"><h3>Example</h3><p><code>
  1099. SSLProxyVerifyDepth 10
  1100. </code></p></div>
  1101.  
  1102. </div>
  1103. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1104. <div class="directive-section"><h2><a name="SSLRandomSeed" id="SSLRandomSeed">SSLRandomSeed</a> <a name="sslrandomseed" id="sslrandomseed">Directive</a></h2>
  1105. <table class="directive">
  1106. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Pseudo Random Number Generator (PRNG) seeding 
  1107. source</td></tr>
  1108. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRandomSeed <em>context</em> <em>source</em> 
  1109. [<em>bytes</em>]</code></td></tr>
  1110. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  1111. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1112. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1113. </table>
  1114. <p>
  1115. This configures one or more sources for seeding the Pseudo Random Number
  1116. Generator (PRNG) in OpenSSL at startup time (<em>context</em> is
  1117. <code>startup</code>) and/or just before a new SSL connection is established
  1118. (<em>context</em> is <code>connect</code>). This directive can only be used
  1119. in the global server context because the PRNG is a global facility.</p>
  1120. <p>
  1121. The following <em>source</em> variants are available:</p>
  1122. <ul>
  1123. <li><code>builtin</code>
  1124.     <p> This is the always available builtin seeding source. It's usage
  1125.     consumes minimum CPU cycles under runtime and hence can be always used
  1126.     without drawbacks. The source used for seeding the PRNG contains of the
  1127.     current time, the current process id and (when applicable) a randomly
  1128.     choosen 1KB extract of the inter-process scoreboard structure of Apache.
  1129.     The drawback is that this is not really a strong source and at startup
  1130.     time (where the scoreboard is still not available) this source just
  1131.     produces a few bytes of entropy. So you should always, at least for the
  1132.     startup, use an additional seeding source.</p></li>
  1133. <li><code>file:/path/to/source</code>
  1134.     <p>
  1135.     This variant uses an external file <code>/path/to/source</code> as the
  1136.     source for seeding the PRNG. When <em>bytes</em> is specified, only the
  1137.     first <em>bytes</em> number of bytes of the file form the entropy (and
  1138.     <em>bytes</em> is given to <code>/path/to/source</code> as the first
  1139.     argument). When <em>bytes</em> is not specified the whole file forms the
  1140.     entropy (and <code>0</code> is given to <code>/path/to/source</code> as
  1141.     the first argument). Use this especially at startup time, for instance
  1142.     with an available <code>/dev/random</code> and/or
  1143.     <code>/dev/urandom</code> devices (which usually exist on modern Unix
  1144.     derivates like FreeBSD and Linux).</p>
  1145.     <p>
  1146.     <em>But be careful</em>: Usually <code>/dev/random</code> provides only as
  1147.     much entropy data as it actually has, i.e. when you request 512 bytes of
  1148.     entropy, but the device currently has only 100 bytes available two things
  1149.     can happen: On some platforms you receive only the 100 bytes while on
  1150.     other platforms the read blocks until enough bytes are available (which
  1151.     can take a long time). Here using an existing <code>/dev/urandom</code> is
  1152.     better, because it never blocks and actually gives the amount of requested
  1153.     data. The drawback is just that the quality of the received data may not
  1154.     be the best.</p>
  1155.     <p>
  1156.     On some platforms like FreeBSD one can even control how the entropy is
  1157.     actually generated, i.e. by which system interrupts. More details one can
  1158.     find under <em>rndcontrol(8)</em> on those platforms. Alternatively, when
  1159.     your system lacks such a random device, you can use tool
  1160.     like <a href="http://www.lothar.com/tech/crypto/">EGD</a>
  1161.     (Entropy Gathering Daemon) and run it's client program with the
  1162.     <code>exec:/path/to/program/</code> variant (see below) or use
  1163.     <code>egd:/path/to/egd-socket</code> (see below).</p></li>
  1164.  
  1165. <li><code>exec:/path/to/program</code>
  1166.     <p>
  1167.     This variant uses an external executable
  1168.     <code>/path/to/program</code> as the source for seeding the
  1169.     PRNG. When <em>bytes</em> is specified, only the first
  1170.     <em>bytes</em> number of bytes of its <code>stdout</code> contents
  1171.     form the entropy. When <em>bytes</em> is not specified, the
  1172.     entirety of the data produced on <code>stdout</code> form the
  1173.     entropy. Use this only at startup time when you need a very strong
  1174.     seeding with the help of an external program (for instance as in
  1175.     the example above with the <code>truerand</code> utility you can
  1176.     find in the mod_ssl distribution which is based on the AT&T
  1177.     <em>truerand</em> library). Using this in the connection context
  1178.     slows down the server too dramatically, of course.  So usually you
  1179.     should avoid using external programs in that context.</p></li>
  1180. <li><code>egd:/path/to/egd-socket</code> (Unix only)
  1181.     <p>
  1182.     This variant uses the Unix domain socket of the
  1183.     external Entropy Gathering Daemon (EGD) (see <a href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech
  1184.     /crypto/</a>) to seed the PRNG. Use this if no random device exists
  1185.     on your platform.</p></li>
  1186. </ul>
  1187. <div class="example"><h3>Example</h3><p><code>
  1188. SSLRandomSeed startup builtin<br />
  1189. SSLRandomSeed startup file:/dev/random<br />
  1190. SSLRandomSeed startup file:/dev/urandom 1024<br />
  1191. SSLRandomSeed startup exec:/usr/local/bin/truerand 16<br />
  1192. SSLRandomSeed connect builtin<br />
  1193. SSLRandomSeed connect file:/dev/random<br />
  1194. SSLRandomSeed connect file:/dev/urandom 1024<br />
  1195. </code></p></div>
  1196.  
  1197. </div>
  1198. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1199. <div class="directive-section"><h2><a name="SSLRequire" id="SSLRequire">SSLRequire</a> <a name="sslrequire" id="sslrequire">Directive</a></h2>
  1200. <table class="directive">
  1201. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Allow access only when an arbitrarily complex 
  1202. boolean expression is true</td></tr>
  1203. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRequire <em>expression</em></code></td></tr>
  1204. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  1205. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  1206. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1207. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1208. </table>
  1209. <p>
  1210. This directive specifies a general access requirement which has to be
  1211. fulfilled in order to allow access. It's a very powerful directive because the
  1212. requirement specification is an arbitrarily complex boolean expression
  1213. containing any number of access checks.</p>
  1214. <p>
  1215. The <em>expression</em> must match the following syntax (given as a BNF
  1216. grammar notation):</p>
  1217. <blockquote>
  1218. <pre>
  1219. expr     ::= "<strong>true</strong>" | "<strong>false</strong>"
  1220.            | "<strong>!</strong>" expr
  1221.            | expr "<strong>&&</strong>" expr
  1222.            | expr "<strong>||</strong>" expr
  1223.            | "<strong>(</strong>" expr "<strong>)</strong>"
  1224.            | comp
  1225.  
  1226. comp     ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
  1227.            | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
  1228.            | word "<strong><</strong>"  word | word "<strong>lt</strong>" word
  1229.            | word "<strong><=</strong>" word | word "<strong>le</strong>" word
  1230.            | word "<strong>></strong>"  word | word "<strong>gt</strong>" word
  1231.            | word "<strong>>=</strong>" word | word "<strong>ge</strong>" word
  1232.            | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
  1233.            | word "<strong>=~</strong>" regex
  1234.            | word "<strong>!~</strong>" regex
  1235.  
  1236. wordlist ::= word
  1237.            | wordlist "<strong>,</strong>" word
  1238.  
  1239. word     ::= digit
  1240.            | cstring
  1241.            | variable
  1242.            | function
  1243.  
  1244. digit    ::= [0-9]+
  1245. cstring  ::= "..."
  1246. variable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
  1247. function ::= funcname "<strong>(</strong>" funcargs "<strong>)</strong>"
  1248. </pre>
  1249. </blockquote>
  1250. <p>while for <code>varname</code> any variable from <a href="#table3">Table 3</a> can be used. Finally for
  1251. <code>funcname</code> the following functions are available:</p>
  1252. <ul>
  1253. <li><code>file(</code><em>filename</em><code>)</code>
  1254.     <p>
  1255.     This function takes one string argument and expands to the contents of the
  1256.     file. This is especially useful for matching this contents against a
  1257.     regular expression, etc.</p>
  1258. </li>
  1259. </ul>
  1260. <p>Notice that <em>expression</em> is first parsed into an internal machine
  1261. representation and then evaluated in a second step. Actually, in Global and
  1262. Per-Server Class context <em>expression</em> is parsed at startup time and
  1263. at runtime only the machine representation is executed. For Per-Directory
  1264. context this is different: here <em>expression</em> has to be parsed and
  1265. immediately executed for every request.</p>
  1266. <div class="example"><h3>Example</h3><p><code>
  1267. SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \<br />
  1268.             and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \<br />
  1269.             and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \<br />
  1270.             and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \<br />
  1271.             and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \<br />
  1272.            or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  1273. </code></p></div>
  1274.  
  1275. <p><em>Standard CGI/1.0 and Apache variables:</em></p>
  1276. <pre>
  1277. HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
  1278. HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
  1279. HTTP_COOKIE            REMOTE_HOST           API_VERSION
  1280. HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
  1281. HTTP_HOST              IS_SUBREQ             TIME_MON
  1282. HTTP_PROXY_CONNECTION  DOCUMENT_ROOT         TIME_DAY
  1283. HTTP_ACCEPT            SERVER_ADMIN          TIME_HOUR
  1284. HTTP:headername        SERVER_NAME           TIME_MIN
  1285. THE_REQUEST            SERVER_PORT           TIME_SEC
  1286. REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
  1287. REQUEST_SCHEME         REMOTE_ADDR           TIME
  1288. REQUEST_URI            REMOTE_USER           ENV:<strong>variablename</strong>
  1289. REQUEST_FILENAME
  1290. </pre>
  1291. <p><em>SSL-related variables:</em></p>
  1292. <pre>
  1293. HTTPS                  SSL_CLIENT_M_VERSION   SSL_SERVER_M_VERSION
  1294.                        SSL_CLIENT_M_SERIAL    SSL_SERVER_M_SERIAL
  1295. SSL_PROTOCOL           SSL_CLIENT_V_START     SSL_SERVER_V_START
  1296. SSL_SESSION_ID         SSL_CLIENT_V_END       SSL_SERVER_V_END
  1297. SSL_CIPHER             SSL_CLIENT_S_DN        SSL_SERVER_S_DN
  1298. SSL_CIPHER_EXPORT      SSL_CLIENT_S_DN_C      SSL_SERVER_S_DN_C
  1299. SSL_CIPHER_ALGKEYSIZE  SSL_CLIENT_S_DN_ST     SSL_SERVER_S_DN_ST
  1300. SSL_CIPHER_USEKEYSIZE  SSL_CLIENT_S_DN_L      SSL_SERVER_S_DN_L
  1301. SSL_VERSION_LIBRARY    SSL_CLIENT_S_DN_O      SSL_SERVER_S_DN_O
  1302. SSL_VERSION_INTERFACE  SSL_CLIENT_S_DN_OU     SSL_SERVER_S_DN_OU
  1303.                        SSL_CLIENT_S_DN_CN     SSL_SERVER_S_DN_CN
  1304.                        SSL_CLIENT_S_DN_T      SSL_SERVER_S_DN_T
  1305.                        SSL_CLIENT_S_DN_I      SSL_SERVER_S_DN_I
  1306.                        SSL_CLIENT_S_DN_G      SSL_SERVER_S_DN_G
  1307.                        SSL_CLIENT_S_DN_S      SSL_SERVER_S_DN_S
  1308.                        SSL_CLIENT_S_DN_D      SSL_SERVER_S_DN_D
  1309.                        SSL_CLIENT_S_DN_UID    SSL_SERVER_S_DN_UID
  1310.                        SSL_CLIENT_S_DN_Email  SSL_SERVER_S_DN_Email
  1311.                        SSL_CLIENT_I_DN        SSL_SERVER_I_DN
  1312.                        SSL_CLIENT_I_DN_C      SSL_SERVER_I_DN_C
  1313.                        SSL_CLIENT_I_DN_ST     SSL_SERVER_I_DN_ST
  1314.                        SSL_CLIENT_I_DN_L      SSL_SERVER_I_DN_L
  1315.                        SSL_CLIENT_I_DN_O      SSL_SERVER_I_DN_O
  1316.                        SSL_CLIENT_I_DN_OU     SSL_SERVER_I_DN_OU
  1317.                        SSL_CLIENT_I_DN_CN     SSL_SERVER_I_DN_CN
  1318.                        SSL_CLIENT_I_DN_T      SSL_SERVER_I_DN_T
  1319.                        SSL_CLIENT_I_DN_I      SSL_SERVER_I_DN_I
  1320.                        SSL_CLIENT_I_DN_G      SSL_SERVER_I_DN_G
  1321.                        SSL_CLIENT_I_DN_S      SSL_SERVER_I_DN_S
  1322.                        SSL_CLIENT_I_DN_D      SSL_SERVER_I_DN_D
  1323.                        SSL_CLIENT_I_DN_UID    SSL_SERVER_I_DN_UID
  1324.                        SSL_CLIENT_I_DN_Email  SSL_SERVER_I_DN_Email
  1325.                        SSL_CLIENT_A_SIG       SSL_SERVER_A_SIG
  1326.                        SSL_CLIENT_A_KEY       SSL_SERVER_A_KEY
  1327.                        SSL_CLIENT_CERT        SSL_SERVER_CERT
  1328.                        SSL_CLIENT_CERT_CHAIN<strong>n</strong>
  1329.                        SSL_CLIENT_VERIFY
  1330. </pre>
  1331.  
  1332. </div>
  1333. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1334. <div class="directive-section"><h2><a name="SSLRequireSSL" id="SSLRequireSSL">SSLRequireSSL</a> <a name="sslrequiressl" id="sslrequiressl">Directive</a></h2>
  1335. <table class="directive">
  1336. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Deny access when SSL is not used for the 
  1337. HTTP request</td></tr>
  1338. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRequireSSL</code></td></tr>
  1339. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  1340. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  1341. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1342. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1343. </table>
  1344. <p>
  1345. This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for
  1346. the current connection. This is very handy inside the SSL-enabled virtual
  1347. host or directories for defending against configuration errors that expose
  1348. stuff that should be protected. When this directive is present all requests
  1349. are denied which are not using SSL.</p>
  1350. <div class="example"><h3>Example</h3><p><code>
  1351. SSLRequireSSL
  1352. </code></p></div>
  1353.  
  1354. </div>
  1355. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1356. <div class="directive-section"><h2><a name="SSLSessionCache" id="SSLSessionCache">SSLSessionCache</a> <a name="sslsessioncache" id="sslsessioncache">Directive</a></h2>
  1357. <table class="directive">
  1358. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of the global/inter-process SSL Session 
  1359. Cache</td></tr>
  1360. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLSessionCache <em>type</em></code></td></tr>
  1361. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLSessionCache none</code></td></tr>
  1362. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  1363. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1364. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1365. </table>
  1366. <p>
  1367. This configures the storage type of the global/inter-process SSL Session
  1368. Cache. This cache is an optional facility which speeds up parallel request
  1369. processing. For requests to the same server process (via HTTP keep-alive),
  1370. OpenSSL already caches the SSL session information locally. But because modern
  1371. clients request inlined images and other data via parallel requests (usually
  1372. up to four parallel requests are common) those requests are served by
  1373. <em>different</em> pre-forked server processes. Here an inter-process cache
  1374. helps to avoid unneccessary session handshakes.</p>
  1375. <p>
  1376. The following two storage <em>type</em>s are currently supported:</p>
  1377. <ul>
  1378. <li><code>none</code>
  1379.     <p>
  1380.     This is the default and just disables the global/inter-process Session
  1381.     Cache. There is no drawback in functionality, but a noticeable speed
  1382.     penalty can be observed.</p></li>
  1383. <li><code>dbm:/path/to/datafile</code>
  1384.     <p>
  1385.     This makes use of a DBM hashfile on the local disk to synchronize the
  1386.     local OpenSSL memory caches of the server processes. The slight increase
  1387.     in I/O on the server results in a visible request speedup for your
  1388.     clients, so this type of storage is generally recommended.</p></li>
  1389. <li><code>shm:/path/to/datafile</code>[<code>(</code><em>size</em><code>)</code>]
  1390.     <p>
  1391.     This makes use of a high-performance hash table (approx. <em>size</em> bytes
  1392.     in size) inside a shared memory segment in RAM (established via
  1393.     <code>/path/to/datafile</code>) to synchronize the local OpenSSL memory
  1394.     caches of the server processes. This storage type is not available on all
  1395.     platforms.</p></li>
  1396. </ul>
  1397. <div class="example"><h3>Examples</h3><p><code>
  1398. SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data<br />
  1399. SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000)
  1400. </code></p></div>
  1401.  
  1402. </div>
  1403. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1404. <div class="directive-section"><h2><a name="SSLSessionCacheTimeout" id="SSLSessionCacheTimeout">SSLSessionCacheTimeout</a> <a name="sslsessioncachetimeout" id="sslsessioncachetimeout">Directive</a></h2>
  1405. <table class="directive">
  1406. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of seconds before an SSL session expires
  1407. in the Session Cache</td></tr>
  1408. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLSessionCacheTimeout <em>seconds</em></code></td></tr>
  1409. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLSessionCacheTimeout 300</code></td></tr>
  1410. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1411. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1412. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1413. </table>
  1414. <p>
  1415. This directive sets the timeout in seconds for the information stored in the
  1416. global/inter-process SSL Session Cache and the OpenSSL internal memory cache.
  1417. It can be set as low as 15 for testing, but should be set to higher
  1418. values like 300 in real life.</p>
  1419. <div class="example"><h3>Example</h3><p><code>
  1420. SSLSessionCacheTimeout 600
  1421. </code></p></div>
  1422.  
  1423. </div>
  1424. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1425. <div class="directive-section"><h2><a name="SSLVerifyClient" id="SSLVerifyClient">SSLVerifyClient</a> <a name="sslverifyclient" id="sslverifyclient">Directive</a></h2>
  1426. <table class="directive">
  1427. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of Client Certificate verification</td></tr>
  1428. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLVerifyClient <em>level</em></code></td></tr>
  1429. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLVerifyClient none</code></td></tr>
  1430. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1431. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  1432. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1433. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1434. </table>
  1435. <p>
  1436. This directive sets the Certificate verification level for the Client
  1437. Authentication. Notice that this directive can be used both in per-server and
  1438. per-directory context. In per-server context it applies to the client
  1439. authentication process used in the standard SSL handshake when a connection is
  1440. established. In per-directory context it forces a SSL renegotation with the
  1441. reconfigured client verification level after the HTTP request was read but
  1442. before the HTTP response is sent.</p>
  1443. <p>
  1444. The following levels are available for <em>level</em>:</p>
  1445. <ul>
  1446. <li><strong>none</strong>:
  1447.      no client Certificate is required at all</li>
  1448. <li><strong>optional</strong>:
  1449.      the client <em>may</em> present a valid Certificate</li>
  1450. <li><strong>require</strong>:
  1451.      the client <em>has to</em> present a valid Certificate</li>
  1452. <li><strong>optional_no_ca</strong>:
  1453.      the client may present a valid Certificate<br />
  1454.      but it need not to be (successfully) verifiable.</li>
  1455. </ul>
  1456. <p>In practice only levels <strong>none</strong> and
  1457. <strong>require</strong> are really interesting, because level
  1458. <strong>optional</strong> doesn't work with all browsers and level
  1459. <strong>optional_no_ca</strong> is actually against the idea of
  1460. authentication (but can be used to establish SSL test pages, etc.)</p>
  1461. <div class="example"><h3>Example</h3><p><code>
  1462. SSLVerifyClient require
  1463. </code></p></div>
  1464.  
  1465. </div>
  1466. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1467. <div class="directive-section"><h2><a name="SSLVerifyDepth" id="SSLVerifyDepth">SSLVerifyDepth</a> <a name="sslverifydepth" id="sslverifydepth">Directive</a></h2>
  1468. <table class="directive">
  1469. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum depth of CA Certificates in Client 
  1470. Certificate verification</td></tr>
  1471. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLVerifyDepth <em>number</em></code></td></tr>
  1472. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLVerifyDepth 1</code></td></tr>
  1473. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1474. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  1475. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
  1476. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
  1477. </table>
  1478. <p>
  1479. This directive sets how deeply mod_ssl should verify before deciding that the
  1480. clients don't have a valid certificate. Notice that this directive can be
  1481. used both in per-server and per-directory context. In per-server context it
  1482. applies to the client authentication process used in the standard SSL
  1483. handshake when a connection is established. In per-directory context it forces
  1484. a SSL renegotation with the reconfigured client verification depth after the
  1485. HTTP request was read but before the HTTP response is sent.</p>
  1486. <p>
  1487. The depth actually is the maximum number of intermediate certificate issuers,
  1488. i.e. the number of CA certificates which are max allowed to be followed while
  1489. verifying the client certificate. A depth of 0 means that self-signed client
  1490. certificates are accepted only, the default depth of 1 means the client
  1491. certificate can be self-signed or has to be signed by a CA which is directly
  1492. known to the server (i.e. the CA's certificate is under
  1493. <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code>), etc.</p>
  1494. <div class="example"><h3>Example</h3><p><code>
  1495. SSLVerifyDepth 10
  1496. </code></p></div>
  1497.  
  1498. </div>
  1499. </div>
  1500. <div class="bottomlang">
  1501. <p><span>Available Languages: </span><a href="../en/mod/mod_ssl.html" title="English"> en </a></p>
  1502. </div><div id="footer">
  1503. <p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
  1504. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  1505. </body></html>